import 'package:flutter/material.dart';
void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title:'welcom to flutter',
      home: Scaffold(
        appBar: new AppBar(title:new Text('flutter')),
        body: Center(
          child: Container(
            height: 200.0,
            child: MyList()
          )
        )
      ),
    );
  }
}


class MyList extends StatelessWidget {
  @override
  Widget build(BuildContext context){
    return ListView(
      scrollDirection: Axis.horizontal,
      children: <Widget>[
        new Container(
          width: 200.0,
          color: Colors.lightGreenAccent
        ),
        new Container(
          width: 200.0,
          color: Colors.redAccent
        ),
        new Container(
          width: 200.0,
          color: Colors.lightGreenAccent
        ),
        new Container(
          width: 200.0,
          color: Colors.redAccent
        )
      ]
    );
  }
}

